package com.yangyang;

import java.io.FileNotFoundException;
import java.util.concurrent.CountDownLatch;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.Environment;

@SpringBootApplication

public class BaseDubboApplication {

	

	@Bean
	public CountDownLatch closeLatch() {
		return new CountDownLatch(1);
	}
	
	public static void main(String[] args)  throws InterruptedException {
		
		ApplicationContext ctx = new SpringApplicationBuilder()
				.sources(BaseDubboApplication.class)
				.web(false)
				.run(args);

		CountDownLatch closeLatch = ctx.getBean(CountDownLatch.class);
		closeLatch.await();
	}
}
